package com.tianma315.admin.material.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.tianma315.admin.common.base.BaseDao;
import com.tianma315.admin.material.VO.PurchaseAndArrtVO;
import com.tianma315.admin.material.VO.PurchaseVO;
import com.tianma315.admin.material.domain.PurchaseDO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

/**
 * 
 * <pre>
 * 原材料进库表
 * </pre>
 * <small> 2019-05-25 15:23:18 | Aron</small>
 */
public interface PurchaseDao extends BaseDao<PurchaseDO> {
    List<PurchaseVO> getPurchaseVO(@Param("page") Page page,@Param("searchName") String searchName);

    List<PurchaseAndArrtVO> statisticsMaterialAllTable(@Param("materialId")List<Integer> materialIds,
                                                    @Param("beginDate")Date beginDate,@Param("endDate")Date endDate);

    @Update("update purchase set report_img = #{reportImg} where purchase_id = #{purchaseId}")
    int updatePurById(PurchaseDO purchaseDO);

    List<PurchaseAndArrtVO> statisticsMaterialTable(@Param("page")Page page,@Param("materialId")List<Integer> materialIds,
                                                       @Param("beginDate")Date beginDate,@Param("endDate")Date endDate);
}
